﻿IF EXISTS (SELECT * FROM sysobjects WHERE type = 'P' AND name = 'up_UtilityAssetMeter_QuickSearch')
	DROP PROCEDURE up_UtilityAssetMeter_QuickSearch
GO


CREATE proc [dbo].[up_UtilityAssetMeter_QuickSearch]
	 @UtilityFk int = 0
	,@MeterNumber varchar(25) = 'xx-xx-xx'
as

SET @MeterNumber = REPLACE(@MeterNumber, ' ', '')

SELECT 
	CAST(Utility_Asset_MeterId as varchar)
FROM 
	tb_Utility_Asset_Meters
WHERE
	REPLACE(Number, ' ', '') = @MeterNumber
	AND UtilityFk = @UtilityFk 




 